home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 July / CHIP 2006-07.2.iso / program / web_gelistirme / easyphp1-7_setup.exe / {app} / phpmyadmin / tbl_printview.php < prev    next >
Encoding:
PHP Script  |  2003-09-07  |  22.6 KB  |  647 lines

  1. <?php
  2. /* $Id: tbl_printview.php,v 1.66 2003/07/23 18:31:10 lem9 Exp $ */
  3.  
  4.  
  5. /**
  6.  * Gets the variables sent or posted to this script, then displays headers
  7.  */
  8. if (!isset($selected_tbl)) {
  9.     include('./libraries/grab_globals.lib.php');
  10.     include('./header.inc.php');
  11. }
  12.  
  13. // Check parameters
  14.  
  15. if (!isset($the_tables) || !is_array($the_tables)) {
  16.     $the_tables = array();
  17. }
  18.  
  19. /**
  20.  * Gets the relations settings
  21.  */
  22. require('./libraries/relation.lib.php');
  23. require('./libraries/transformations.lib.php');
  24.  
  25. $cfgRelation  = PMA_getRelationsParam();
  26.  
  27.  
  28. /**
  29.  * Defines the url to return to in case of error in a sql statement
  30.  */
  31. if (isset($table)) {
  32.     $err_url = 'tbl_properties.php?' . PMA_generate_common_url($db, $table);
  33. } else {
  34.     $err_url = 'db_details.php?' . PMA_generate_common_url($db);
  35. }
  36.  
  37.  
  38. /**
  39.  * Selects the database
  40.  */
  41. PMA_mysql_select_db($db);
  42.  
  43.  
  44. /**
  45.  * Multi-tables printview thanks to Christophe GeschΘ from the "MySQL Form
  46.  * Generator for PHPMyAdmin" (http://sourceforge.net/projects/phpmysqlformgen/)
  47.  */
  48. if (isset($selected_tbl) && is_array($selected_tbl)) {
  49.     $the_tables   = $selected_tbl;
  50. } else if (isset($table)) {
  51.     $the_tables[] = $table;
  52. }
  53. $multi_tables     = (count($the_tables) > 1);
  54.  
  55. if ($multi_tables) {
  56.     $tbl_list     = '';
  57.     while (list($key, $table) = each($the_tables)) {
  58.         $tbl_list .= (empty($tbl_list) ? '' : ', ')
  59.                   . PMA_backquote(urldecode($table));
  60.     }
  61.     echo '<b>'.  $strShowTables . ' : ' . $tbl_list . '</b>' . "\n";
  62.     echo '<hr />' . "\n";
  63. } // end if
  64.  
  65. $tables_cnt = count($the_tables);
  66. reset($the_tables);
  67. $counter    = 0;
  68.  
  69. while (list($key, $table) = each($the_tables)) {
  70.     $table = urldecode($table);
  71.     if ($counter + 1 >= $tables_cnt) {
  72.         $breakstyle = '';
  73.     } else {
  74.         $breakstyle = ' style="page-break-after: always;"';
  75.     }
  76.     $counter++;
  77.     echo '<div' . $breakstyle . '>' . "\n";
  78.     echo '<h1>' . $table . '</h1>' . "\n";
  79.  
  80.     /**
  81.      * Gets table informations
  82.      */
  83.     // The 'show table' statement works correct since 3.23.03
  84.     if (PMA_MYSQL_INT_VERSION >= 32303) {
  85.         $local_query  = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
  86.         $result       = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
  87.         $showtable    = PMA_mysql_fetch_array($result);
  88.         $num_rows     = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
  89.         $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
  90.     } else {
  91.         $local_query  = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table);
  92.         $result       = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
  93.         $showtable    = array();
  94.         $num_rows     = PMA_mysql_result($result, 0, 'count');
  95.         $show_comment = '';
  96.     } // end display comments
  97.     if ($result) {
  98.         mysql_free_result($result);
  99.     }
  100.  
  101.  
  102.     /**
  103.      * Gets table keys and retains them
  104.      */
  105.     $local_query  = 'SHOW KEYS FROM ' . PMA_backquote($table);
  106.     $result       = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
  107.     $primary      = '';
  108.     $indexes      = array();
  109.     $lastIndex    = '';
  110.     $indexes_info = array();
  111.     $indexes_data = array();
  112.     $pk_array     = array(); // will be use to emphasis prim. keys in the table
  113.                              // view
  114.     while ($row = PMA_mysql_fetch_array($result)) {
  115.         // Backups the list of primary keys
  116.         if ($row['Key_name'] == 'PRIMARY') {
  117.             $primary .= $row['Column_name'] . ', ';
  118.             $pk_array[$row['Column_name']] = 1;
  119.         }
  120.         // Retains keys informations
  121.         if ($row['Key_name'] != $lastIndex ){
  122.             $indexes[] = $row['Key_name'];
  123.             $lastIndex = $row['Key_name'];
  124.         }
  125.         $indexes_info[$row['Key_name']]['Sequences'][]     = $row['Seq_in_index'];
  126.         $indexes_info[$row['Key_name']]['Non_unique']      = $row['Non_unique'];
  127.         if (isset($row['Cardinality'])) {
  128.             $indexes_info[$row['Key_name']]['Cardinality'] = $row['Cardinality'];
  129.         }
  130. //      I don't know what does following column mean....
  131. //      $indexes_info[$row['Key_name']]['Packed']          = $row['Packed'];
  132.         $indexes_info[$row['Key_name']]['Comment']         = $row['Comment'];
  133.  
  134.         $indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name']  = $row['Column_name'];
  135.         if (isset($row['Sub_part'])) {
  136.             $indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part'] = $row['Sub_part'];
  137.         }
  138.  
  139.     } // end while
  140.     if ($result) {
  141.         mysql_free_result($result);
  142.     }
  143.  
  144.  
  145.     /**
  146.      * Gets fields properties
  147.      */
  148.     $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table);
  149.     $result      = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
  150.     $fields_cnt  = mysql_num_rows($result);
  151.  
  152.     // Check if we can use Relations (Mike Beck)
  153.     if (!empty($cfgRelation['relation'])) {
  154.         // Find which tables are related with the current one and write it in
  155.         // an array
  156.         $res_rel = PMA_getForeigners($db, $table);
  157.  
  158.         if (count($res_rel) > 0) {
  159.             $have_rel = TRUE;
  160.         } else {
  161.             $have_rel = FALSE;
  162.         }
  163.     }
  164.     else {
  165.            $have_rel = FALSE;
  166.     } // end if
  167.  
  168.  
  169.     /**
  170.      * Displays the comments of the table if MySQL >= 3.23
  171.      */
  172.     if (!empty($show_comment)) {
  173.         echo $strTableComments . ' : ' . $show_comment . '<br /><br />';
  174.     }
  175.  
  176.     /**
  177.      * Displays the table structure
  178.      */
  179.     ?>
  180.  
  181. <!-- TABLE INFORMATIONS -->
  182. <table width="95%" bordercolorlight="black" border="border" style="border-collapse: collapse; background-color: white">
  183. <tr>
  184.     <th width="50"><?php echo $strField; ?></th>
  185.     <th width="80"><?php echo $strType; ?></th>
  186.     <!--<th width="50"><?php echo $strAttr; ?></th>-->
  187.     <th width="40"><?php echo $strNull; ?></th>
  188.     <th width="70"><?php echo $strDefault; ?></th>
  189.     <!--<th width="50"><?php echo $strExtra; ?></th>-->
  190.     <?php
  191.     echo "\n";
  192.     if ($have_rel) {
  193.         echo '    <th>' . $strLinksTo . '</th>' . "\n";
  194.     }
  195.     if ($cfgRelation['commwork']) {
  196.         echo '    <th>' . $strComments . '</th>' . "\n";
  197.     }
  198.     if ($cfgRelation['mimework']) {
  199.         echo '    <th>MIME</th>' . "\n";
  200.     }
  201.     ?>
  202. </tr>
  203.  
  204.     <?php
  205.     $i = 0;
  206.     while ($row = PMA_mysql_fetch_array($result)) {
  207.         $bgcolor = ($i % 2) ?$cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
  208.         $i++;
  209.  
  210.         $type             = $row['Type'];
  211.         // reformat mysql query output - staybyte - 9. June 2001
  212.         // loic1: set or enum types: slashes single quotes inside options
  213.         if (eregi('^(set|enum)\((.+)\)$', $type, $tmp)) {
  214.             $tmp[2]       = substr(ereg_replace('([^,])\'\'', '\\1\\\'', ',' . $tmp[2]), 1);
  215.             $type         = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
  216.             $type_nowrap  = '';
  217.  
  218.             $binary       = 0;
  219.             $unsigned     = 0;
  220.             $zerofill     = 0;
  221.         } else {
  222.             $type_nowrap  = ' nowrap="nowrap"';
  223.             $type         = eregi_replace('BINARY', '', $type);
  224.             $type         = eregi_replace('ZEROFILL', '', $type);
  225.             $type         = eregi_replace('UNSIGNED', '', $type);
  226.             if (empty($type)) {
  227.                 $type     = ' ';
  228.             }
  229.  
  230.             $binary       = eregi('BINARY', $row['Type'], $test);
  231.             $unsigned     = eregi('UNSIGNED', $row['Type'], $test);
  232.             $zerofill     = eregi('ZEROFILL', $row['Type'], $test);
  233.         }
  234.         $strAttribute     = ' ';
  235.         if ($binary) {
  236.             $strAttribute = 'BINARY';
  237.         }
  238.         if ($unsigned) {
  239.             $strAttribute = 'UNSIGNED';
  240.         }
  241.         if ($zerofill) {
  242.             $strAttribute = 'UNSIGNED ZEROFILL';
  243.         }
  244.         if (!isset($row['Default'])) {
  245.             if ($row['Null'] != '') {
  246.                 $row['Default'] = '<i>NULL</i>';
  247.             }
  248.         } else {
  249.             $row['Default'] = htmlspecialchars($row['Default']);
  250.         }
  251.         $field_name = htmlspecialchars($row['Field']);
  252.         echo "\n";
  253.         ?>
  254. <tr>
  255.     <td width="50" class="print" nowrap="nowrap">
  256.     <?php
  257.     if (isset($pk_array[$row['Field']])) {
  258.         echo '    <u>' . $field_name . '</u> ' . "\n";
  259.     } else {
  260.         echo '    ' . $field_name . ' ' . "\n";
  261.     }
  262.     ?>
  263.     </td>
  264.     <td width="80" class="print"<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
  265.     <!--<td width="50" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $strAttribute; ?></td>-->
  266.     <td width="40" class="print"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
  267.     <td width="70" class="print" nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?> </td>
  268.     <!--<td width="50" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?> </td>-->
  269.     <?php
  270.     echo "\n";
  271.     if ($have_rel) {
  272.         echo '    <td class="print">';
  273.         if (isset($res_rel[$field_name])) {
  274.             echo htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' -> ' . $res_rel[$field_name]['foreign_field'] );
  275.         }
  276.         echo ' </td>' . "\n";
  277.     }
  278.     if ($cfgRelation['commwork']) {
  279.         echo '    <td class="print">';
  280.         $comments = PMA_getComments($db, $table);
  281.         if (isset($comments[$field_name])) {
  282.             echo htmlspecialchars($comments[$field_name]);
  283.         }
  284.         echo ' </td>' . "\n";
  285.     }
  286.     if ($cfgRelation['mimework']) {
  287.         $mime_map = PMA_getMIME($db, $table, true);
  288.  
  289.         echo '    <td class="print">';
  290.         if (isset($mime_map[$field_name])) {
  291.             echo htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype']));
  292.         }
  293.         echo ' </td>' . "\n";
  294.     }
  295.     ?>
  296. </tr>
  297.         <?php
  298.     } // end while
  299.     mysql_free_result($result);
  300.  
  301.     echo "\n";
  302.     ?>
  303. </table>
  304.  
  305.  
  306.     <?php
  307.     /**
  308.      * Displays indexes
  309.      */
  310.     $index_count = (isset($indexes))
  311.                  ? count($indexes)
  312.                  : 0;
  313.     if ($index_count > 0) {
  314.         echo "\n";
  315.         ?>
  316. <br /><br />
  317.  
  318. <!-- Indexes -->
  319.  <big><?php echo $strIndexes . ' :'; ?></big>
  320. <table bordercolorlight="black" border="border" style="border-collapse: collapse; background-color: white">
  321.     <tr>
  322.         <th><?php echo $strKeyname; ?></th>
  323.         <th><?php echo $strType; ?></th>
  324.         <th><?php echo $strCardinality; ?></th>
  325.         <th colspan="2"><?php echo $strField; ?></th>
  326.     </tr>
  327.         <?php
  328.         echo "\n";
  329.         while (list($index_no, $index_name) = each($indexes)) {
  330.             $cell_bgd = (($index_no % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']);
  331.             $index_td = '        <td class="print" rowspan="' . count($indexes_info[$index_name]['Sequences']) . '">' . "\n";
  332.             echo '    <tr>' . "\n";
  333.             echo $index_td
  334.                  . '            ' . htmlspecialchars($index_name) . "\n"
  335.                  . '        </td>' . "\n";
  336.  
  337.             if ($indexes_info[$index_name]['Comment'] == 'FULLTEXT') {
  338.                 $index_type = 'FULLTEXT';
  339.             } else if ($index_name == 'PRIMARY') {
  340.                 $index_type = 'PRIMARY';
  341.             } else if ($indexes_info[$index_name]['Non_unique'] == '0') {
  342.                 $index_type = 'UNIQUE';
  343.             } else {
  344.                 $index_type = 'INDEX';
  345.             }
  346.             echo $index_td
  347.                  . '            ' . $index_type . "\n"
  348.                  . '        </td>' . "\n";
  349.  
  350.             echo $index_td
  351.                  . '            ' . (isset($indexes_info[$index_name]['Cardinality']) ? $indexes_info[$index_name]['Cardinality'] : $strNone) . "\n"
  352.                  . '        </td>' . "\n";
  353.  
  354.             while (list($row_no, $seq_index) = each($indexes_info[$index_name]['Sequences'])) {
  355.                 if ($row_no > 0) {
  356.                     echo '    <tr>' . "\n";
  357.                 }
  358.                 if (!empty($indexes_data[$index_name][$seq_index]['Sub_part'])) {
  359.                     echo '        <td class="print">' . "\n"
  360.                          . '            ' . $indexes_data[$index_name][$seq_index]['Column_name'] . "\n"
  361.                          . '        </td>' . "\n";
  362.                     echo '        <td align="right" class="print">' . "\n"
  363.                          . '            ' . $indexes_data[$index_name][$seq_index]['Sub_part'] . "\n"
  364.                          . '        </td>' . "\n";
  365.                     echo '    </tr>' . "\n";
  366.                 } else {
  367.                     echo '        <td class="print" colspan="2">' . "\n"
  368.                          . '            ' . $indexes_data[$index_name][$seq_index]['Column_name'] . "\n"
  369.                          . '        </td>' . "\n";
  370.                     echo '    </tr>' . "\n";
  371.                 }
  372.             } // end while
  373.         } // end while
  374.         echo "\n";
  375.         ?>
  376. </table>
  377.         <?php
  378.         echo "\n";
  379.     } // end display indexes
  380.  
  381.  
  382.     /**
  383.      * Displays Space usage and row statistics
  384.      *
  385.      * staybyte - 9 June 2001
  386.      */
  387.     if ($cfg['ShowStats']) {
  388.         $nonisam     = FALSE;
  389.         if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
  390.             $nonisam = TRUE;
  391.         }
  392.         if (PMA_MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
  393.             // Gets some sizes
  394.             $mergetable     = FALSE;
  395.             if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') {
  396.                 $mergetable = TRUE;
  397.             }
  398.             list($data_size, $data_unit)         = PMA_formatByteDown($showtable['Data_length']);
  399.             if ($mergetable == FALSE) {
  400.                 list($index_size, $index_unit)   = PMA_formatByteDown($showtable['Index_length']);
  401.             }
  402.             if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) {
  403.                 list($free_size, $free_unit)     = PMA_formatByteDown($showtable['Data_free']);
  404.                 list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
  405.             } else {
  406.                 unset($free_size);
  407.                 unset($free_unit);
  408.                 list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length']);
  409.             }
  410.             list($tot_size, $tot_unit)           = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length']);
  411.             if ($num_rows > 0) {
  412.                 list($avg_size, $avg_unit)       = PMA_formatByteDown(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
  413.             }
  414.  
  415.             // Displays them
  416.             ?>
  417. <br /><br />
  418.  
  419. <table border="0" cellspacing="0" cellpadding="0">
  420. <tr>
  421.  
  422.     <!-- Space usage -->
  423.     <td class="print" valign="top">
  424.          <big><?php echo $strSpaceUsage . ' :'; ?></big>
  425.         <table width="100%" bordercolorlight="black" border="border" style="border-collapse: collapse; background-color: white">
  426.         <tr>
  427.             <th><?php echo $strType; ?></th>
  428.             <th colspan="2" align="center"><?php echo $strUsage; ?></th>
  429.         </tr>
  430.         <tr>
  431.             <td class="print" style="padding-right: 10px"><?php echo $strData; ?></td>
  432.             <td align="right" class="print" nowrap="nowrap"><?php echo $data_size; ?></td>
  433.             <td class="print"><?php echo $data_unit; ?></td>
  434.         </tr>
  435.             <?php
  436.             if (isset($index_size)) {
  437.                 echo "\n";
  438.                 ?>
  439.         <tr>
  440.             <td class="print" style="padding-right: 10px"><?php echo $strIndex; ?></td>
  441.             <td align="right" class="print" nowrap="nowrap"><?php echo $index_size; ?></td>
  442.             <td class="print"><?php echo $index_unit; ?></td>
  443.         </tr>
  444.                 <?php
  445.             }
  446.             if (isset($free_size)) {
  447.                 echo "\n";
  448.                 ?>
  449.         <tr style="color: #bb0000">
  450.             <td class="print" style="padding-right: 10px"><?php echo $strOverhead; ?></td>
  451.             <td align="right" class="print" nowrap="nowrap"><?php echo $free_size; ?></td>
  452.             <td class="print"><?php echo $free_unit; ?></td>
  453.         </tr>
  454.         <tr>
  455.             <td class="print" style="padding-right: 10px"><?php echo $strEffective; ?></td>
  456.             <td align="right" class="print" nowrap="nowrap"><?php echo $effect_size; ?></td>
  457.             <td class="print"><?php echo $effect_unit; ?></td>
  458.         </tr>
  459.                 <?php
  460.             }
  461.             if (isset($tot_size) && $mergetable == FALSE) {
  462.                 echo "\n";
  463.                 ?>
  464.         <tr>
  465.             <td class="print" style="padding-right: 10px"><?php echo $strTotalUC; ?></td>
  466.             <td align="right" class="print" nowrap="nowrap"><?php echo $tot_size; ?></td>
  467.             <td class="print"><?php echo $tot_unit; ?></td>
  468.         </tr>
  469.                 <?php
  470.             }
  471.             echo "\n";
  472.             ?>
  473.         </table>
  474.     </td>
  475.  
  476.     <td width="20" class="print"> </td>
  477.  
  478.     <!-- Rows Statistic -->
  479.     <td valign="top">
  480.          <big><?php echo $strRowsStatistic . ' :'; ?></big>
  481.         <table width=100% bordercolorlight="black" border="border" style="border-collapse: collapse; background-color: white">
  482.         <tr>
  483.             <th><?php echo $strStatement; ?></th>
  484.             <th align="center"><?php echo $strValue; ?></th>
  485.         </tr>
  486.             <?php
  487.             $i = 0;
  488.             if (isset($showtable['Row_format'])) {
  489.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  490.                 echo "\n";
  491.                 ?>
  492.         <tr>
  493.             <td class="print"><?php echo ucfirst($strFormat); ?></td>
  494.             <td align="<?php echo $cell_align_left; ?>" class="print" nowrap="nowrap">
  495.                 <?php
  496.                 echo '                ';
  497.                 if ($showtable['Row_format'] == 'Fixed') {
  498.                     echo $strFixed;
  499.                 } else if ($showtable['Row_format'] == 'Dynamic') {
  500.                     echo $strDynamic;
  501.                 } else {
  502.                     echo $showtable['Row_format'];
  503.                 }
  504.                 echo "\n";
  505.                 ?>
  506.             </td>
  507.         </tr>
  508.                 <?php
  509.             }
  510.             if (isset($showtable['Rows'])) {
  511.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  512.                 echo "\n";
  513.             ?>
  514.         <tr>
  515.             <td class="print"><?php echo ucfirst($strRows); ?></td>
  516.             <td align="right" class="print" nowrap="nowrap">
  517.                 <?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
  518.             </td>
  519.         </tr>
  520.                 <?php
  521.             }
  522.             if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
  523.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  524.                 echo "\n";
  525.                 ?>
  526.         <tr>
  527.             <td class="print"><?php echo ucfirst($strRowLength); ?> ø</td>
  528.             <td class="print" nowrap="nowrap">
  529.                 <?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
  530.             </td>
  531.         </tr>
  532.                 <?php
  533.             }
  534.             if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
  535.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  536.                 echo "\n";
  537.                 ?>
  538.         <tr>
  539.             <td class="print"><?php echo ucfirst($strRowSize); ?> ø</td>
  540.             <td align="right" class="print" nowrap="nowrap">
  541.                 <?php echo $avg_size . ' ' . $avg_unit . "\n"; ?>
  542.             </td>
  543.         </tr>
  544.                 <?php
  545.             }
  546.             if (isset($showtable['Auto_increment'])) {
  547.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  548.                 echo "\n";
  549.                 ?>
  550.         <tr>
  551.             <td class="print"><?php echo ucfirst($strNext); ?> Autoindex</td>
  552.             <td align="right" class="print" nowrap="nowrap">
  553.                 <?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
  554.             </td>
  555.         </tr>
  556.                 <?php
  557.             }
  558.             echo "\n";
  559.  
  560.             if (isset($showtable['Create_time'])) {
  561.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  562.                 echo "\n";
  563.                 ?>
  564.         <tr>
  565.             <td class="print"><?php echo $strStatCreateTime; ?></td>
  566.             <td align="right" class="print" nowrap="nowrap">
  567.                 <?php echo PMA_localisedDate(strtotime($showtable['Create_time'])) . "\n"; ?>
  568.             </td>
  569.         </tr>
  570.                 <?php
  571.             }
  572.             echo "\n";
  573.  
  574.             if (isset($showtable['Update_time'])) {
  575.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  576.                 echo "\n";
  577.                 ?>
  578.         <tr>
  579.             <td class="print"><?php echo $strStatUpdateTime; ?></td>
  580.             <td align="right" class="print" nowrap="nowrap">
  581.                 <?php echo PMA_localisedDate(strtotime($showtable['Update_time'])) . "\n"; ?>
  582.             </td>
  583.         </tr>
  584.                 <?php
  585.             }
  586.             echo "\n";
  587.  
  588.             if (isset($showtable['Check_time'])) {
  589.                 $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
  590.                 echo "\n";
  591.                 ?>
  592.         <tr>
  593.             <td class="print"><?php echo $strStatCheckTime; ?></td>
  594.             <td align="right" class="print" nowrap="nowrap">
  595.                 <?php echo PMA_localisedDate(strtotime($showtable['Check_time'])) . "\n"; ?>
  596.             </td>
  597.         </tr>
  598.                 <?php
  599.             }
  600.             echo "\n";
  601.             ?>
  602.         </table>
  603.     </td>
  604. </tr>
  605. </table>
  606.  
  607.             <?php
  608.         } // end if (PMA_MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE)
  609.     } // end if ($cfg['ShowStats'])
  610.  
  611.     echo "\n";
  612.     if ($multi_tables) {
  613.         unset($ret_keys);
  614.         unset($num_rows);
  615.         unset($show_comment);
  616.         echo '<hr />' . "\n";
  617.     } // end if
  618.     echo '</div>' . "\n";
  619.  
  620. } // end while
  621.  
  622.  
  623.  
  624. /**
  625.  * Displays the footer
  626.  */
  627. echo "\n";
  628. ?>
  629. <script type="text/javascript" language="javascript1.2">
  630. <!--
  631. function printPage()
  632. {
  633.     document.getElementById('print').style.visibility = 'hidden';
  634.     // Do print the page
  635.     if (typeof(window.print) != 'undefined') {
  636.         window.print();
  637.     }
  638.     document.getElementById('print').style.visibility = '';
  639. }
  640. //-->
  641. </script>
  642. <?php
  643. echo '<br /><br /> <input type="button" style="visibility: ; width: 100px; height: 25px" id="print" value="' . $strPrint . '" onclick="printPage()">' . "\n";
  644.  
  645. require('./footer.inc.php');
  646. ?>
  647.